import 'package:fish_redux/fish_redux.dart';

enum DraggableImagePickerAction {
  action,
  onAddPic,
  onDeletePic,
  onReorderPic,
}

class DraggableImagePickerActionCreator {
  static Action onAction() {
    return const Action(DraggableImagePickerAction.action);
  }

  static Action onAddPic(file) {
    return Action(DraggableImagePickerAction.onAddPic, payload: file);
  }

  static Action onDeletePic(item) {
    return Action(DraggableImagePickerAction.onDeletePic, payload: item);
  }

  static Action onReorderPic(index, old) {
    return Action(DraggableImagePickerAction.onReorderPic,
        payload: {'index': index, 'old': old});
  }
}
